import React, { Component } from 'react';
import Son from './Son';
class DemoParentToChild extends Component {
    state = { 
      num: 'num',
      userinfo: {
        name: 'zhangsan',
        age: 18
      }
    } 
    render() { 
        return (
         <div className='parent'>
           <h3>7.1 父传子</h3>
           <Son num={this.state.num}  userinfo={this.state.userinfo}/>
         </div>
        );
    }
}
 
export default DemoParentToChild;